package org.easy.tool.service.impl;

import org.easy.tool.common.SecureUtil;
import org.easy.tool.common.WebUtil;
import org.easy.tool.entity.Admin;
import org.easy.tool.mapper.AdminMapper;
import org.easy.tool.service.IAdmin;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.LinkedHashMap;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Valley
 * @since 2025-03-27 09:09:15
 */
@Service
public class AdminService extends ServiceImpl<AdminMapper, Admin> implements IAdmin {


    @Override
    public boolean addAdmin(LinkedHashMap data) {
        String code = (String) data.get("code");
        String name = (String) data.get("name");
        Admin admin = new Admin();
        admin.setCode(code);
        admin.setName(name);
        return save(admin);
    }
}
